package com.nf.db.handlers.list;

import com.nf.db.handlers.ResultSetHandler;

import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.*;

import static com.nf.db.handlers.RowProcessor.DEFAULT_ROWPROCESSOR;

/*
 * 让ResultSetHandler处理结果集，并将结果集转换为List<map<String,Object>>
 * */
public class MapListHandler extends AbstractListHandler<Map<String, Object>> {
    @Override
    protected Map<String, Object> handlerRow(ResultSet rs) throws SQLException {
        return DEFAULT_ROWPROCESSOR.toMap(rs);
    }
}
